package com.dongdongshop.pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

@Document(collection = "conment")
public class Conment implements Serializable {
    @Id
    private String id;
    @Field
    private String userId;
    @Field
    private String message;
    @Field
    private Date nowDate;
    @Field
    private Long rank;
    @Field
    private String sellerid;
    @Field
    private String imgUrl;
    @Field
    private String zan;
    @Field
    private String sellerName;

    @Override
    public String toString() {
        return "Conment{" +
                "id='" + id + '\'' +
                ", userId='" + userId + '\'' +
                ", message='" + message + '\'' +
                ", nowDate=" + nowDate +
                ", rank=" + rank +
                ", sellerid='" + sellerid + '\'' +
                ", imgUrl='" + imgUrl + '\'' +
                ", zan='" + zan + '\'' +
                ", sellerName='" + sellerName + '\'' +
                '}';
    }

    public String getSellerName() {
        return sellerName;
    }

    public void setSellerName(String sellerName) {
        this.sellerName = sellerName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getNowDate() {
        return nowDate;
    }

    public void setNowDate(Date nowDate) {
        this.nowDate = nowDate;
    }

    public Long getRank() {
        return rank;
    }

    public void setRank(Long rank) {
        this.rank = rank;
    }

    public String getSellerid() {
        return sellerid;
    }

    public void setSellerid(String sellerid) {
        this.sellerid = sellerid;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getZan() {
        return zan;
    }

    public void setZan(String zan) {
        this.zan = zan;
    }

    public Conment(String id, String userId, String message, Date nowDate, Long rank, String sellerid, String imgUrl, String zan) {
        this.id = id;
        this.userId = userId;
        this.message = message;
        this.nowDate = nowDate;
        this.rank = rank;
        this.sellerid = sellerid;
        this.imgUrl = imgUrl;
        this.zan = zan;
    }

    public Conment() {
    }

}
